Skip to content

Conversation

lavarou
Copy link
Member

@lavarou lavarou commented Jun 13, 2025

Force non-zero duration of helper user function. When tests execute fast enough, the helper function's segment start time and end time are equal and this causes the segment to be dropped. To address this test instability, non-zero duration is forced on test helper user functions. This is a follow up to #781.

force non-zero duration of helper user function
When tests execute fast enough, the helper function's segment start time and
end time are equal and this causes the segment to be dropped. To address this test instability,
non-zero duration is forced on test helper user functions.
@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Jun 13, 2025

Test Suite Status Result
Multiverse 8/8 passing
SOAK 79/85 passing

@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.27%. Comparing base (afc6d35) to head (604cd2c).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1087   +/-   ##
=======================================
  Coverage   77.27%   77.27%           
=======================================
  Files         199      199           
  Lines       28342    28342           
=======================================
  Hits        21902    21902           
  Misses       6440     6440           
Flag Coverage Δ
agent-for-php-7.2 77.47% <ø> (ø)
agent-for-php-7.3 77.49% <ø> (ø)
agent-for-php-7.4 77.36% <ø> (ø)
agent-for-php-8.0 76.56% <ø> (ø)
agent-for-php-8.1 76.88% <ø> (ø)
agent-for-php-8.2 76.50% <ø> (?)
agent-for-php-8.3 76.50% <ø> (ø)
agent-for-php-8.4 76.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lavarou lavarou changed the title tests: make trampoline tests deterministic tests: make tests deterministic Jun 13, 2025
@lavarou lavarou marked this pull request as ready for review June 13, 2025 19:02
@lavarou lavarou requested a review from zsistla June 13, 2025 19:16
@lavarou lavarou merged commit f2c18ed into dev Jun 13, 2025
65 checks passed
@lavarou lavarou deleted the tests/force-segment-duration branch June 13, 2025 20:00
@zsistla zsistla added this to the next-release milestone Jun 17, 2025
hahuja2 pushed a commit that referenced this pull request Jul 9, 2025
Force non-zero duration of helper user function. When tests execute fast
enough, the helper function's segment start time and end time are equal
and this causes the segment to be dropped. To address this test
instability, non-zero duration is forced on test helper user functions.
This is a follow up to #781.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants